<?php
class Sidebox extends AppModel {

	var $name = 'Sidebox';
	var $validate = array(
		'name' => VALID_NOT_EMPTY,
		'display' => VALID_NUMBER,
		'column' => VALID_NUMBER,
	);

	var $order = array('Sidebox.priority desc');
	
	function findLeftSideboxes()
	{
		return $this -> findAll(array('column' => 1, 'display' => 1),null,$this -> order);
	}
	
	function findRightSideboxes()
	{
		return $this -> findAll(array('column' => 3, 'display' => 1),null,$this->order);
	}
	
	function findMiddleSideboxes()
	{
		return $this -> findAll(array('column' => 2, 'display' => 1),null,$this->order);
	}

	//The Associations below have been created with all possible keys, those that are not needed can be removed
}
?>